/*
 *  Level.h
 *  pogostick
 *
 *  Created by chuck@kollar.com on 10/11/09.
 *  Copyright 2009 Charles P. Kollar All rights reserved.
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#import "cocos2d.h"
#import "chipmunk.h"
#import <math.h>

#import "common.h"
#import "Menu.h"
#import "Floor.h"
#import "PogoStick.h"
#import "Person.h"
#import "Bug.h"
#import "LunarLander.h"
#import "PillCage.h"
#import "VerticalPlatform.h"
#import "ArcPlatform.h"
#import "Door.h"
#import "ChipmunkPhys.h"

// Required Frameworks: OpenAL, AudioToolbox, AVFoundation
// Developer > Platforms > iPhoneOS.platform > Developer > SDKs > iPhoneOS2.2.sdk > System > Library > Frameworks
#import "SimpleAudioEngine.h"


@interface Level : NSObject {
    NSString *path;
    cpSpace *space;
    cpBody *staticBody;
    PogoStick *stick;
    
    cpVect initialStickPosition;
    
    // Remember to add these to the init and dealloc routines...
    NSMutableArray *floors;
    NSMutableArray *persons;
    NSMutableArray *bugs;
    NSMutableArray *lems;
    NSMutableArray *pillCages;
    NSMutableArray *platforms;
    NSMutableArray *doors;
    
    cpFloat drawingWidth;
    cpFloat drawingHeight;
    
    // This particle system is used when the pogostick pops a power-up pill,
    // or get's hit by a bullet.
    ParticleSystem *emitter;
    
    // This particle system is used to show thruse from the lunar lander...
    ParticleSystem *thrustEmitter;
}

@property (readwrite,assign) NSString *path;
@property (readwrite,assign) cpSpace *space;
@property (readwrite,assign) cpBody *staticBody;
@property (readwrite,assign) PogoStick *stick;
@property (readwrite,assign) cpVect initialStickPosition;
@property (readwrite,assign) NSMutableArray *floors;
@property (readwrite,assign) NSMutableArray *persons;
@property (readwrite,assign) NSMutableArray *bugs;
@property (readwrite,assign) NSMutableArray *lems;
@property (readwrite,assign) NSMutableArray *pillCages;
@property (readwrite,assign) NSMutableArray *platforms;
@property (readwrite,assign) NSMutableArray *doors;
@property (readwrite,assign) cpFloat drawingWidth;
@property (readwrite,assign) cpFloat drawingHeight;
@property (readwrite,assign) ParticleSystem *emitter;
@property (readwrite,assign) ParticleSystem *thrustEmitter;

-(id) initInSpace:(cpSpace *)sp fileName:(NSString *)fn ParseError:(NSError **)error;
-(BOOL) performActions;
-(BOOL) stickInDoor;
-(void) dealloc;

@end

